function curry(func) {
    return function curriedFn(...args) {
        console.log(args.length + ";" + func.len);
        // 判断实参和形参的个数
        if (args.length < func.length) {
            return function() {
                return curriedFn(...args.concat(Array.from(arguments)));
            }
        }
        return func(...args);
    }
}

let curried = curry((a, b, c) => {return a + b + c});

console.log(curried(1)(2,3,4))
